<template>
	<view>
		<view class="plr-36 ptb-40">

			<view class="u-row-around mt-30">
				<text class="bold">整洁</text>
				<u-rate v-if="info.score1" :count="5" v-model="info.score1" active-color="#EE8931" inactive-color="#999"
					:disabled="false" gutter="50" size="50"></u-rate>
				<text class="bold">{{ pin1 }}</text>
			</view>

			<view class="u-row-around mt-30">
				<text class="bold">设备</text>
				<u-rate :count="5" v-if="info.score2" v-model="info.score2" active-color="#EE8931" inactive-color="#999"
					:disabled="false" gutter="50" size="50"></u-rate>
				<text class="bold">{{ pin2 }}</text>
			</view>

			<view class="u-row-around mt-30">
				<text class="bold">服务</text>
				<u-rate :count="5" v-if="info.score3" v-model="info.score3" active-color="#EE8931" inactive-color="#999"
					:disabled="false" gutter="50" size="50"></u-rate>
				<text class="bold">{{ pin3 }}</text>
			</view>

			<view class="u-row-around mt-30">
				<text class="bold">准时</text>
				<u-rate :count="5" v-if="info.score4" v-model="info.score4" active-color="#EE8931" inactive-color="#999"
					:disabled="false" gutter="50" size="50"></u-rate>
				<text class="bold">{{ pin4 }}</text>
			</view>
			<view class="pl">
				<view class="plText">评价内容：</view>
				<view class="textarea">{{info.remarks}}</view>
				<!-- <textarea name="" v-if="info.remarks" style="margin:10rpx 0;" v-model="info.remarks" placeholder="请输入评价"
					id="" cols="30" rows="10" disabled="true"></textarea> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {},
			}
		},
		onLoad(option) {
			console.log("cxzcxzcz", option.id)
			this.id = option.id

		},
		onShow() {
			this.init()
		},
		computed: {
			score() {
				return this.info.score || 0
			},
			pin1() {
				if (this.info.score1) {
					return this.info.score1 == '1' ? '非常差' : this.info.score1 == '2' ? '差' : this.info.score1 == '3' ?
						'一般' : this.info.score1 ==
						'4' ? '满意' : '非常满意';
				}

			},
			pin2() {
				if (this.info.score2) {
					return this.info.score2 == '1' ? '非常差' : this.info.score2 == '2' ? '差' : this.info.score2 == '3' ?
						'一般' : this.info.score2 ==
						'4' ? '满意' : '非常满意';
				}
			},
			pin3() {
				if (this.info.score3) {
					return this.info.score3 == '1' ? '非常差' : this.info.score3 == '2' ? '差' : this.info.score3 == '3' ?
						'一般' : this.info.score3 ==
						'4' ? '满意' : '非常满意';
				}
			},
			pin4() {
				if (this.info.score4) {
					return this.info.score4 == '1' ? '非常差' : this.info.score4 == '2' ? '差' : this.info.score4 == '3' ?
						'一般' : this.info.score4 ==
						'4' ? '满意' : '非常满意';
				}
			}
		},
		methods: {
			init() {
				let _this = this
				this.$http('/addons/ddrive/order/info', {
					order_id: this.id
				}, "POST").then(data => {
					console.log("data", data)
					this.info = data
				})
			},
		}
	}
</script>

<style>
	.pl {
		width: 100%;
		height: auto;
		margin-top: 40rpx;
		display: flex;
		color: #222222;
		font-weight: bold;
	}

	.plText {
		width: 160rpx;
	}

	.textarea {
		width: 510rpx;
	}
</style>